﻿<!--DOCTYPE html-->
<html>
	<head>
		<meta charset="utf-8">
		<title>文档标题</title>
	</head>
	<body style='background-color:rgb(10, 158, 133);'>
		<form action="upload" method="post" enctype="multipart/form-data">
			<h2>题目:<input type="title"  name="title" style="width:90%;height:30px;font-size:20px;font-weight:bold" /></h2>
			
			文章类型<select name="classid">
			<option value="1" selected>图片</option>
			<option value="2">视频</option>
			<option value="3">音乐</option>
			<option value="4">软件</option>
			<option value="5">书籍</option>
			</select>
			<br/>
			<textarea type="text" name="text" style="width:100%;height:500px;font-size:18px" ></textarea>
			<!--div-->
			  <input type="file" name="file">
			  <!--div id="feedback"-->
			  <!--/div-->
			  <!--label id="progress-label" for="progress"></label>
			  <progress id="progress" value="0" max="100"> </progress-->
			<!--/div-->
			<p/><input type="submit" value="提交"/>
		</form>
		
		<!--script type="text/javascript">
			const fileUploader = document.getElementById('file-uploader');
			const feedback = document.getElementById('feedback');
			const progress = document.getElementById('progress');

			const reader = new FileReader();

			fileUploader.addEventListener('change', (event) => {
			  const files = event.target.files;
			  const file = files[0];
			  reader.readAsDataURL(file);

			  reader.addEventListener('progress', (event) => {
				if (event.loaded && event.total) {
				  const percent = (event.loaded / event.total) * 100;
				  progress.value = percent;
				  document.getElementById('progress-label').innerHTML = Math.round(percent) + '%';

				  if (percent === 100) {
					let msg = `<span style="color:green;">文件 <u><b>${file.name}</b></u> 已上传成功!</span>`;
					feedback.innerHTML = msg;
				  }
				}
			  });
			});
		</script-->
	</body>
</html>